package com.maxuxu.service;

import com.maxuxu.dao.BookMapper;
import com.maxuxu.pojo.Books;

import java.util.List;
public class BookServiceImpl implements BookService{
// service层掉 dao层 ： 组合dao
    private BookMapper bookMapper;

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    @Override
    public int addBook(Books book) {
        return bookMapper.addBook(book);
    }

    @Override
    public int delBookByID(int id) {
        return bookMapper.delBookByID(id);
    }

    @Override
    public int updBook(Books book) {
        return bookMapper.updBook(book);
    }

    @Override
    public Books queryBookByID(int id) {
        return bookMapper.queryBookByID(id);
    }

    @Override
    public List<Books> queryAllBook() {
        return bookMapper.queryAllBook();
    }
}
